Imports DotNetNuke
Imports System.Web.UI
Imports System.Collections.Generic
Imports System.Reflection
Imports DotNetNuke.Security.PortalSecurity

Namespace SGW.ComunicadorWeb
    Public MustInherit Class ViewSGW_Prioridades
        Inherits Entities.Modules.PortalModuleBase

        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If HasEditPermissions(ModuleId, TabId) Then
                AddItemButton.Enabled = True
            Else
                AddItemButton.Enabled = False
            End If
            'Me.SGW_PrioridadesDataSource.SelectMethod = "GetSGW_PrioridadesByPri_PortalID(" & Me.PortalId & ")"
            Me.GridView1.Columns(1).HeaderText = Localization.GetString("LblPri_Nombre.Text", Me.LocalResourceFile)
            Me.GridView1.Columns(2).HeaderText = Localization.GetString("LblPri_Peso.Text", Me.LocalResourceFile)

        End Sub

        Protected Sub AddItemButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddItemButton.Click
            Me.AddItemButton.Visible = False
            Me.FormView1.Visible = True
        End Sub

        Protected Sub InsertItemButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
            Me.FormView1.Visible = False
            AddItemButton.Text = "SGW_Prioridades Successfully Added - Click To Add Another"
        End Sub

        Protected Sub InsertCancelButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
            Me.AddItemButton.Visible = True
            Me.FormView1.Visible = False
        End Sub

        Protected Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridView1.PageIndexChanging
            GridView1.PageIndex = e.NewPageIndex
        End Sub

        Protected Sub cmdCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
            Try
                Response.Redirect(NavigateURL(), True)
            Catch exc As Exception    'Module failed to load
                ProcessModuleLoadException(Me, exc)
            End Try

        End Sub
    End Class

End Namespace

